# a ='{"logs":"[{"action":"searchkeywordclient","json":{"type":"song","keyword":"%s","offset":%s}}]","csrf_token":""}'
#
# a = a %("a","a")
#
# print(a)


a = "f1mkYI1kxhtYceraUj1dBCDaYiUTJXVrJMl+aMXLNwbCpxPW9EFczUU4Q3bDAtiZhPARRSaPtSyg9I02nskO21gy0DmvMm1aLo4P3N2Px1ZfyqJ5VJrkpzCI5qJ9DN/kIMKUVmgWWtwEkZ3AchrRbg=="
b = "NmzOuTu0aEAG2XO0qwN6uSB+nRMfzvgu4VvDZ0wcavo1+UiYLWpHe3XZOzw5Wgwp3Kz7KeU5shnB82Z7YQAhWYTc5hzE1DvEUCULnVe/qZwRLZFDgPDYpqVHkPbRHQzX2tcqSQxoPXzcRiy+WooXLl9tqo9S8U4WJ261hbsQTaELANHdsp/C/QOs+nN83mm0"

c = "NmzOuTu0aEAG2XO0qwN6uSB+nRMfzvgu4VvDZ0wcavo1+UiYLWpHe3XZOzw5Wgwp3Kz7KeU5shnB82Z7YQAhWYTc5hzE1DvEUCULnVe/qZwRLZFDgPDYpqVHkPbRHQzX2tcqSQxoPXzcRiy+WooXLl9tqo9S8U4WJ261hbsQTaE0JKAUmRbD7y2cGZ2CvsQ7B1Ez5IxJGKcKuNBCxqIVS7eZjJPJ5h4AK9/SjIyt/5cNOA7OQ+mDS3OM6PzEUkwz"

d = "f1mkYI1kxhtYceraUj1dBCDaYiUTJXVrJMl+aMXLNwbCpxPW9EFczUU4Q3bDAtiZhPARRSaPtSyg9I02nskO21gy0DmvMm1aLo4P3N2Px1ZfyqJ5VJrkpzCI5qJ9DN/k8GIoIDI47xoRS4Q4wlro8/KogBJbOoMLqmdnIDbUEFYPwZtHkFANzVb3wA/zNv76PogTqnQy4X228NJVc2aHMA=="

print(a == b)
print(a == c)
print(c == d)
"dtBJRaa5Yc4lTqnKjQo9Kl14Nl5VInRGTn8Ha3IurjMGfIVNemiGDVE6UuRi4ZcC6jtvsCYKhLm6oY4xOC9doq4eHR4a5GDRZ5OGnERAkx88b22vN+Z0rQ1k5RL9ydO2KVuEUJeHly0G6DQ2mYYXWA2PAkgCekAibtqpv4z7fPyi0fnLBFbZPR6UkTfOxdgQhZewettoauQzcOyO8B+p8UBsrlN2U/Ivv3H4VvZfrX6NxYFiDohH7KOp4+zEHel85QclLS82DTk72UiNsI7gnjllXwTHcQvJ1gBm4V7AkBw="
"14087ab2cf7c774464ebbcc81800e1fc2969fe902f61b6d17804f6b31809096fd5471771a9f0de0a898f51a5eb86f17d2f649c570afe4fb337acb3aeb441e53009c0c950203a28f7ce62d73937a649b2c0cd8917d0c50dc3a0cae50144117d63e2ce140ad128f9ab0e3933954f026aa9b2f945d0b8368ded9275f113399f85e8"

'''
"Tg2tkVIFUM7OH0iXsvSCOmy60QQUlcFiir9YAa6w+WlzFI9nei/pyqEYxN4nb2Zhd0cs4ma4nPyVBs3N2lIAnsPtQc1APX2MRZviOuVUfulPjLx27VPjSmq3i2p1bSxKte71Xj/8qGkig/CDyDmzULiIULoM9n+K5WL5JhaASKJ/eeUlcP40dtWp3PAa864e"
"Tg2tkVIFUM7OH0iXsvSCOtcZxJq2zWx0pjA22g046jARpCdHSCEWVRn7qN4vsfftQT0aknrWIqvKX5fE1v1B1R+2Ltrn1RJiqIvyKWVO61Tm/SJOzsDk0COLxPMJPKPSs5mPIEBtlROpduAiLZkY2hTgH8V2vo11hJ31e/amITScpmlVCf35aQJTJI1UKzjo"
"09Ar7UxvSUzndmiHidqqmnSsT3oqCWNDJRLtkkdkpHPvzTEHiXNPoN2+NYsmpyoAkC8eCpwSOn8/tgCMZpgYzdDHIA0Jgt9kF5yFgxftjqDZobY7q+K2e1J4HQS8EmfUL1HwycDm+Y2mkj3UBzI2qtXIX9GR3UKDbdNRYcrnFplADW34STfe7A+NGiRXR04ueuFc84Z6c85GGxezevLfde7lTsx6WQpa6rB0Fv9Jk06JzNPXw8KUVGp0qU5UD5TE+KhEzHmvdQ/Y7IKJ9asplA=="
"09Ar7UxvSUzndmiHidqqmmZLgNX8mRfaYp5/5Gp+nTv3iBThW3lZI4MrM7hFf+33Toh/5IoPTTOLqsCpe+LoX7lnuGvzN+B7hftmAg4kN9d4yPjRK82AkTGOvdCWUZKX9UVovFcpeg8wH9ECDCLw5rzSDXuwpqWoWdycNztRv9ChLduIek287TlNYol5sJsHAWvo9N8aBO2TfvxvyQGJWTaWdbizppZBO+z2EvYeAW8mX6pwjslGk1R7xZxVskWlX/OSsiRyweJxosNHGazrvw=="
'''

#
# a = "-123"
#
# if a.isdigit():
#     print("11")
# else:
#     print("22")
'''
print(len("e10adc3949ba59abbe56e057f20f883e"))

print(len("0dec30e696a1f1913aa361eb92d97d2e"))
"0dec30e696a1f1913aa361eb92d97d2e"
"609a7b853dabb81660e56a4c1b011e4d"
"16b32a0a86bebe5ee65362e2aa03d607"
from hashlib import md5
a = "agenttype=1&callback=window.lib.__callbacks__.cb3ywpvj&ptid=01010021010000000000"+"tS7BdPLU2w0JD89dh"
print(md5(bytes(a,encoding="utf-8")).hexdigest())


"1707c08cd5034a457227d3e0df6b4d7fae22d1e0c84e511d156a0f96e5637d3c05eeea61b070f2fdedd9b846b19497164f61d7a28438ccf01edfc100912f1f5d"
"728482e84c9e3e73cb14ea80aec2008469c5c6df9a8e96d93355006cbc0417c1433da2fefda131e9dd414069b27198da249dda52f7944b6fa99a595ce0e5a716"
print(len("728482e84c9e3e73cb14ea80aec2008469c5c6df9a8e96d93355006cbc0417c1433da2fefda131e9dd414069b27198da249dda52f7944b6fa99a595ce0e5a716"))

'''

# import hashlib
#
# print(hashlib.sha512(bytes("zcy19960106.", encoding="utf-8")).hexdigest())
# print(len(
#     "36eb7bba0128e5135740d1404fa007eee6678f9eb3491fdd5d03a7b1874df58e7aa31968eeaa2c8a6635abe015c029c424e239c6a058f2ec733eabaee5f3e296"))
'''
import requests

# cookie = "QC005=a72c564a6eb94b23e28c677e65c75941; QC173=1; QC007=DIRECT; QC006=5bpzej9gpf4aym7ezfme6kv0; QC008=1566032226.1566032226.1566032226.1; nu=0; QC010=245201281; P00004=.1566032228.7f5f573d61; P00001=57cjzm1m1Qm1J0Y6J120jm2cPbtP6qym2kVvAGwlHwzwm3aPWI3yDwxlt0Re4P575vVZ3TlP9c; P00003=1576287609; P00010=1576287609; P01010=1566057600; P00007=57cjzm1m1Qm1J0Y6J120jm2cPbtP6qym2kVvAGwlHwzwm3aPWI3yDwxlt0Re4P575vVZ3TlP9c; P00PRU=1576287609; P00002=%7B%22uid%22%3A%221576287609%22%2C%22pru%22%3A1576287609%2C%22user_name%22%3A%2218716758271%22%2C%22nickname%22%3A%22%5Cu559c%5Cu6b22%5Cu5403%5Cu9ebb%5Cu8fa3%5Cu9999%5Cu9505%5Cu7684%5Cu7eb3%5Cu5170%5Cu5174%5Cu8a00%22%2C%22pnickname%22%3A%22%5Cu559c%5Cu6b22%5Cu5403%5Cu9ebb%5Cu8fa3%5Cu9999%5Cu9505%5Cu7684%5Cu7eb3%5Cu5170%5Cu5174%5Cu8a00%22%2C%22type%22%3A11%2C%22email%22%3A%22%22%7D; P000email=18716758271; QC160=%7B%22u%22%3A%2218716758271%22%2C%22lang%22%3A%22%22%2C%22local%22%3A%7B%22name%22%3A%22%E4%B8%AD%E5%9B%BD%E5%A4%A7%E9%99%86%22%2C%22init%22%3A%22Z%22%2C%22rcode%22%3A48%2C%22acode%22%3A%2286%22%7D%2C%22type%22%3A%22p1%22%7D; QC170=0; __uuid=6e66c98c-74f5-da5f-1611-be1e0f14759f; __dfp=a0ec30917570074dffb0cde2a4ccb84abe2e5ca1734d37356a9cedefe25e6d709b@1566435571579@1565139571579; QC175=%7B%22upd%22%3Atrue%2C%22ct%22%3A1566032265116%7D; QC163=1"
cookie = "P00001=57cjzm1m1Qm1J0Y6J120jm2cPbtP6qym2kVvAGwlHwzwm3aPWI3yDwxlt0Re4P575vVZ3TlP9c;P00002=%7B%22uid%22%3A%221576287609%22%2C%22pru%22%3A1576287609%2C%22user_name%22%3A%2218716758271%22%2C%22nickname%22%3A%22%5Cu559c%5Cu6b22%5Cu5403%5Cu9ebb%5Cu8fa3%5Cu9999%5Cu9505%5Cu7684%5Cu7eb3%5Cu5170%5Cu5174%5Cu8a00%22%2C%22pnickname%22%3A%22%5Cu559c%5Cu6b22%5Cu5403%5Cu9ebb%5Cu8fa3%5Cu9999%5Cu9505%5Cu7684%5Cu7eb3%5Cu5170%5Cu5174%5Cu8a00%22%2C%22type%22%3A11%2C%22email%22%3A%22%22%7D; P000email=18716758271;"
headers = {
    "cookie": cookie,
    "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36",
    "Referer": "https://www.iqiyi.com/"
}
api = "https://pcw-api.iqiyi.com/passport/user/userinfodetail?version=1"

res = requests.get(api, headers=headers)
print(str(res.content, encoding="utf-8"))
"T00404=af98b02814ab349dcbf258a2e02046ad; QC005=6e88089f5a0c8cb0682e575804b63522; QC006=twp83meu0fpoht8nodkxje9; __uuid=328e19b4-c4ac-a343-0572-e116ee2220cc; P00004=.1557720638.dac295f092; QP001=1; QP0017=100; QP0018=100; QC173=0; QC021=%5B%7B%22key%22%3A%22%E6%AD%A6%E6%9E%97%E5%A4%96%E4%BC%A0%22%7D%5D; QC124=1%7C0; QP0013=; _ga=GA1.2.889261574.1563768299; QC008=1557720634.1565139570.1566005463.10; QC001=1; nu=0; Hm_lvt_53b7374a63c37483e5dd97d78d9bb36e=1563768274,1564997457,1565139571,1566005463; QC176=%7B%22state%22%3A0%2C%22ct%22%3A1566005475097%7D; QC007=DIRECT; CA0001=%7B%22code%22%3A%22b20f64bd520f631bA00000%22%2C%22type%22%3A132%2C%22detail%22%3A%7B%22fv%22%3A%22%22%2C%22text1%22%3A%22%E9%A6%96%E6%9C%88%E4%BB%856%E5%85%83%22%2C%22autoRenew%22%3A%22true%22%2C%22type1%22%3A%7B%22vipType%22%3A%229c4e4c1c18827a41%22%2C%22type%22%3A%225%22%2C%22fc%22%3A%2290647efdbbc99688%22%7D%2C%22packageAmount%22%3A%221%22%7D%2C%22passportId%22%3A%22%22%2C%22locale%22%3A%22cn%22%7D; QP0022=CT%7CSiChuan_ChengDu-171.216.69.128%7Cbaiducdn_ct%7C0; T00700=EgcIysDtIRABEgcI9L-tIRABEgcI0b-tIRABEgcIz7-tIRABEgcImMDtIRABEgcI58DtIRABEgcI77-tIRABEgcIhcDtIRABEgcI5MDtIRAB; QC159=%7B%22color%22%3A%22FFFFFF%22%2C%22channelConfig%22%3A1%2C%22isOpen%22%3A1%2C%22speed%22%3A13%2C%22density%22%3A30%2C%22opacity%22%3A86%2C%22isFilterColorFont%22%3A1%2C%22proofShield%22%3A0%2C%22forcedFontSize%22%3A24%2C%22isFilterImage%22%3A1%2C%22isset%22%3A1%2C%22hadTip%22%3A1%2C%22hideRoleTip%22%3A1%7D; QP007=22500; QC160=%7B%22u%22%3A%2218716758271%22%2C%22lang%22%3A%22%22%2C%22local%22%3A%7B%22name%22%3A%22%E4%B8%AD%E5%9B%BD%E5%A4%A7%E9%99%86%22%2C%22init%22%3A%22Z%22%2C%22rcode%22%3A48%2C%22acode%22%3A%2286%22%7D%2C%22type%22%3A%22p1%22%7D; P00001=11v4VsDIWvhXiVtaNm2sEcy2lyNV3g8Az32nMNuLobUR3GUSwitNbvpgoGhtm1AHyugt04; P00003=1576287609; P00010=1576287609; P01010=1566057600; P00007=11v4VsDIWvhXiVtaNm2sEcy2lyNV3g8Az32nMNuLobUR3GUSwitNbvpgoGhtm1AHyugt04; P00PRU=1576287609; P00002=%7B%22uid%22%3A%221576287609%22%2C%22pru%22%3A1576287609%2C%22user_name%22%3A%2218716758271%22%2C%22nickname%22%3A%22%5Cu559c%5Cu6b22%5Cu5403%5Cu9ebb%5Cu8fa3%5Cu9999%5Cu9505%5Cu7684%5Cu7eb3%5Cu5170%5Cu5174%5Cu8a00%22%2C%22pnickname%22%3A%22%5Cu559c%5Cu6b22%5Cu5403%5Cu9ebb%5Cu8fa3%5Cu9999%5Cu9505%5Cu7684%5Cu7eb3%5Cu5170%5Cu5174%5Cu8a00%22%2C%22type%22%3A11%2C%22email%22%3A%22%22%7D; P000email=18716758271; QC170=0; QC163=1; QC175=%7B%22upd%22%3Atrue%2C%22ct%22%3A1566023742781%7D; QC178=true; Hm_lpvt_53b7374a63c37483e5dd97d78d9bb36e=1566028702; QC010=264341899; __dfp=a0ec30917570074dffb0cde2a4ccb84abe2e5ca1734d37356a9cedefe25e6d709b@1566435571579@1565139571579; IMS=IggQAxj_yODqBSokCiBiZTZiM2Q2YTg3NDcxMzgzZDYzN2FjMDkxMzM0NTIxNhAAMAEwATABMAEwAUABSgNiMDE"
'''

import requests

cookie = "__ysuid=1556613039348WWW; _uab_collina=155780994120580787143453; juid=01daqbb1pl1ju3; ysestep=1; cna=Rh99FeeOaBUCAavZPGgH7bUH; yseidcount=8; ystep=8; ctoken=H9iw-9XbpjMLbWdsEq_LKbCP; __ayft=1566032644217; __aysid=1566032644218pFD; __ayscnt=1; P_gck=NA%7CC4H60wp3KFEZkb%2FX%2BGBWFQ%3D%3D%7CNA%7C1566032674646; __arpvid=1566032684698vN3Sq3-1566032684791; __aypstp=3; __ayspstp=3; isg=BG1tOGHOzJtYg6l6VDcmUob4fAknYsTx4QnSHa9z_4RzJonYbxowbarkErplvblU"

headers = {
    "cookie": cookie,
    "Referer": "https://www.youku.com/",
    "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36"
}
api = "https://cmstool.youku.com/cms/player/userinfo/user_info?specialTest=test&client=pc&"

response = requests.get(api, headers=headers)
print(response.text)
